package net.sourceforge.zmanim.Calculator;

import net.sourceforge.zmanim.Calendar.AstronomicalCalendar;

public interface ICalculator extends Cloneable {
    /**
     * @return the descriptive name of the algorithm.
     */
    String getCalculatorName();

    /**
     * Setter method for the descriptive name of the calculator. This will
     * typically not have to be set
     *
     * @param calculatorName
     *            descriptive name of the algorithm.
     */
    //	public abstract void setCalculatorName(String calculatorName);

    /**
     * A method that calculates UTC sunrise as well as any time based on an
     * angle above or below sunrise. This abstract method is implemented by the
     * classes that extend this class.
     *
     * @param astronomicalCalendar Used to calculate day of year.
     * @param zenith               the azimuth below the vertical zenith of 90 degrees. for
     *                             sunrise typically the {@link #adjustZenith zenith} used for
     *                             the calculation uses geometric zenith of 90&deg; and
     *                             {@link #adjustZenith adjusts} this slightly to account for
     *                             solar refraction and the sun's radius. Another example would
     *                             be {@link net.sourceforge.zmanim.Calendar.AstronomicalCalendar#getBeginNauticalTwilight()}
     *                             that passes {@link net.sourceforge.zmanim.Calendar.AstronomicalCalendar#NAUTICAL_ZENITH} to
     *                             this method.
     * @return The UTC time of sunrise in 24 hour format. 5:45:00 AM will return
     *         5.75.0. If an error was encountered in the calculation (expected
     *         behavior for some locations such as near the poles,
     *         {@link java.lang.Double.NaN} will be returned.
     */
    double getUTCSunrise(
            AstronomicalCalendar astronomicalCalendar, double zenith,
            boolean adjustForElevation);

    /**
     * A method that calculates UTC sunset as well as any time based on an angle
     * above or below sunset. This abstract method is implemented by the classes
     * that extend this class.
     *
     * @param astronomicalCalendar Used to calculate day of year.
     * @param zenith               the azimuth below the vertical zenith of 90&deg;. For sunset
     *                             typically the {@link #adjustZenith zenith} used for the
     *                             calculation uses geometric zenith of 90&deg; and
     *                             {@link #adjustZenith adjusts} this slightly to account for
     *                             solar refraction and the sun's radius. Another example would
     *                             be {@link AstronomicalCalendar#getEndNauticalTwilight()} that
     *                             passes {@link AstronomicalCalendar#NAUTICAL_ZENITH} to this
     *                             method.
     * @return The UTC time of sunset in 24 hour format. 5:45:00 AM will return
     *         5.75.0. If an error was encountered in the calculation (expected
     *         behavior for some locations such as near the poles,
     *         {@link java.lang.Double.NaN} will be returned.
     */
    double getUTCSunset(
            AstronomicalCalendar astronomicalCalendar, double zenith,
            boolean adjustForElevation);

    Object clone();
}
